/*
 * @Author: Bennty
 * @Date: 2024-11-18 16:02:44
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2024-11-21 16:33:22
 * @Description: 请填写简介
 */
import request from '@/utils/request';
import { QueryPackageType } from './types';

/** 查询辅材包装订单列表 */
export const getPackageListApi = (data: QueryPackageType) => {
    return request({
        url: '/system/auxiliaryPackingOrder/list',
        method: 'post',
        data: data
    })
};

/** 获取辅材包装订单详细信息 */
export const getPackageOrderDetailApi = (id: any) => {
    return request({
        url: `/system/auxiliaryPackingOrder/${id}`,
        method: 'get'
    });
};

/** 修改辅材包装订单 */
export const editPackageOrderApi = (data: any) => {
    return request({
        url: `/system/auxiliaryPackingOrder`,
        method: 'put',
        data: data
    });
};

/** 删除辅材包装订单 */
export const deletePackageOrderApi = (ids: any) => {
    return request({
        url: `/system/auxiliaryPackingOrder/${ids}`,
        method: 'delete'
    });
};

/** 包装件生产订单详情 */
export const getPackageProduceOrderDetailApi = (id: any) => {
    return request({
        url: `/system/auxiliaryPackingOrder/getDetailById`,
        method: 'get',
        params:{id: id}
    });
};


/** 打印包装件生产订单 */
export const printPackageProduceOrderApi = (data: any) => {
    return request({
        url:'/system/auxiliaryPackingOrder/printPackingOrder',
        method: 'post',
        params: data
    })
};

/** 包装件入库 */
export const packageOrderInStorageApi = (data: any) => {
    return request({
        url: '/system/auxiliaryPackingOrder/store',
        method: 'put',
        params: data
    });
};

/** 辅材包装件配料申请详情 */
export const getApplyIngredientsDetailApi = (id: any) => {
    return request({
        url: '/system/auxiliaryPackingOrder/ingredientApplicationDetail',
        method: 'get',
        params: {id: id}
    });
};

/** 打印包装件配料申请单 */
export const printApplyIngredientsOrderApi = (data: any) => {
    return request({
        url: '/system/auxiliaryPackingOrder/printIngredient',
        method: 'post',
        data: data
    });
};